package com.loveprogrammer.dto.job;

import com.loveprogrammer.dto.base.RequestBase;
import com.loveprogrammer.pojo.StringMessage;
import lombok.Data;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @ClassName HeroInfo
 * @Description 英雄基本信息
 * @Author admin
 * @Date 2024/2/20 14:58
 * @Version 1.0
 */
@Data
public class HeroInfo extends RequestBase {

    public HeroInfo() {
    }

    public String string = "\t\t\t\t\t\t\t\t\t";

    private int id;                         // 角色id
    private String name;                   // 角色信息模板
    private int strength;                  // 力量 影响物理输出 物理技能输出
    private int armature;                 // 护甲值 影响物理防御和法术防御
    private int constitution;               // 体质 影响生命值 一点体质增加10点生命值
    private int magic;                       // 魔力 影响法术输出 法术技能输出
    private int technique;                   // 技巧 影响闪避率、暴击率
    private int speed;                         // 攻击速度
    private int hpMax;                        // 最大生命值

    private int level;                           // 级别
    private Integer currentExp;

    /**
     * 下一级所需经验值
     **/
    private Integer nextLevelNeedExp;

    // 毒抗
    private int poisonResistance;

    // 火抗
    private int flameResistance;

    // 电抗
    private int thunderResistance;

    // 冰抗
    private int iceResistance;



    //角色打印信息的重写
    public String prettyPrint() {
        return string + "*****信息****\n" +
                string + "姓名：" + this.name + "\n" +
                string + "级别" + this.level + "\n" +
                string + "血量：" + this.hpMax + "\n" +
                string + "力量：" + this.strength + "\n" +
                string + "法力：" + this.magic + "\n" +
                string + "技巧：" + this.technique + "\n" +
                string + "护甲值" + this.armature + "\n" +
                string + "速度" + this.speed + "\n" +
                string + "毒抗" + this.poisonResistance + "\n" +
                string + "火抗" + this.flameResistance + "\n" +
                string + "雷抗" + this.thunderResistance + "\n" +
                string + "冰抗" + this.iceResistance + "\n" +
                string + "当前经验" + this.currentExp + "\n" +
                string + "下一级经验" + this.nextLevelNeedExp + "\n" +
                string + "" + "*************";
    }


    //角色打印信息的重写
    public String toString() {
        return "**** 名称：" + this.name + " " +
                "级" + this.level + " " +
                "血：" + this.hpMax + " " +
                "甲: " + this.armature + " " +
                "力:" + this.strength + " " +
                "法:" + this.magic + " " +
                "技:" + this.technique + " " +
                "速:" + this.speed + " " +
                "抗性[毒:" + this.poisonResistance + " " +
                "火:" + this.flameResistance + " " +
                "雷:" + this.thunderResistance + " " +
                "冰:" + this.iceResistance + "] " +
                "经验(" + this.currentExp + "/" + this.nextLevelNeedExp + ") ****";
    }
}
